package com.lcj.ssm.mapper;

import com.lcj.ssm.po.User;
import com.lcj.ssm.po.UserCustomer;
import com.lcj.ssm.po.UserExample;
import com.lcj.ssm.po.UserRole;
import com.lcj.ssm.po.UserVO;

import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface UserMapper {
    int countByExample(UserExample example);

    int deleteByExample(UserExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    List<User> selectByExample(UserExample example);

    User selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

    int updateByExample(@Param("record") User record, @Param("example") UserExample example);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);
    
    List<UserCustomer> selectUserList(UserVO uservo);
    
    UserCustomer selectUser(User user);
    
    int selectTotalCount(UserVO userVO);
    
    int insertIntoUserRole(UserRole ur);
    
    UserCustomer selectUserById(Integer id);
    
    int updateUserRole(UserRole ur);
    
    int deleteUserRole(int userid);
    
    User selectUserByUserName(String loginname);
}